﻿using System;
using System.Drawing;

namespace HML
{
    /// <summary>
    /// DropDownListPlus选项绘制后事件参数
    /// </summary>
    public class DropDownListPlusItemDrawAfterEventArgs : EventArgs
    {
        private readonly DropDownListPlusItem item;
        /// <summary>
        /// 选项
        /// </summary>
        public DropDownListPlusItem Item
        {
            get { return this.item; }
        }

        private readonly float dpi;
        /// <summary>
        /// 系统缩放比例
        /// </summary>
        public float Dpi
        {
            get { return this.dpi; }
        }

        private readonly Graphics graphics;
        /// <summary>
        /// 封装一个GDI+绘图图面 （ 当前 Clip=Bounds_C ）
        /// </summary>
        public Graphics Graphics
        {
            get { return this.graphics; }
        }

        private readonly RectangleF bounds_C;
        /// <summary>
        /// 选项区域（包含:内容）
        /// </summary>
        public RectangleF Bounds_C
        {
            get { return this.bounds_C; }
        }

        private readonly bool selected;
        /// <summary>
        /// 是否选中
        /// </summary>
        public bool Selected
        {
            get { return this.selected; }
        }

        private readonly bool isMouseEnter;
        /// <summary>
        /// 鼠标是否进入选项
        /// </summary>
        public bool IsMouseEnter
        {
            get { return this.isMouseEnter; }
        }

        private readonly Rectangle imageBounds_C;
        /// <summary>
        /// 选项图片区域
        /// </summary>
        public Rectangle ImageBounds_C
        {
            get { return this.imageBounds_C; }
        }

        private readonly Rectangle textBounds_C;
        /// <summary>
        /// 选项文本区域
        /// </summary>
        public Rectangle TextBounds_C
        {
            get { return this.textBounds_C; }
        }

        private readonly SolidBrush backBrush;
        /// <summary>
        /// 选项背景色画笔
        /// </summary>
        public SolidBrush BackBrush
        {
            get { return this.backBrush; }
        }

        private readonly SolidBrush foreBrush;
        /// <summary>
        /// 选项前景色画笔
        /// </summary>
        public SolidBrush ForeBrush
        {
            get { return this.foreBrush; }
        }

        private readonly Pen splitterPen;
        /// <summary>
        /// 选项分隔线画笔
        /// </summary>
        public Pen SplitterPen
        {
            get { return this.splitterPen; }
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="item">选项</param>
        /// <param name="dpi">系统缩放比例</param>
        /// <param name="graphics">封装一个GDI+绘图图面 （ 当前 Clip=Bounds_C ）</param>
        /// <param name="bounds_C">选项区域（包含:内容）</param>
        /// <param name="selected">是否选中</param>
        /// <param name="isMouseEnter">鼠标是否进入选项</param>
        /// <param name="imageBounds_C">选项图片区域</param>
        /// <param name="textBounds_C">选项文本区域</param>
        /// <param name="backBrush">选项背景色画笔</param>
        /// <param name="foreBrush">选项前景色画笔</param>
        /// <param name="splitterPen">选项分隔线画笔</param>
        public DropDownListPlusItemDrawAfterEventArgs(DropDownListPlusItem item, float dpi, Graphics graphics, Rectangle bounds_C, bool selected, bool isMouseEnter, Rectangle imageBounds_C, Rectangle textBounds_C, SolidBrush backBrush, SolidBrush foreBrush, Pen splitterPen)
        {
            this.item = item;
            this.dpi = dpi;
            this.graphics = graphics;
            this.bounds_C = bounds_C;
            this.isMouseEnter = isMouseEnter;
            this.selected = selected;
            this.imageBounds_C = imageBounds_C;
            this.textBounds_C = textBounds_C;
            this.backBrush = backBrush;
            this.foreBrush = foreBrush;
            this.splitterPen = splitterPen;
        }
    }

}
